<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/commons/include/html_doctype.html"%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<%@include file="/commons/page/codegen.jsp"%>

<%//@include file="/commons/myconfig.jsp"%>

<script type="text/javascript" src="${ctx}/js/plugins/layui/layui.js"></script>
<style type="text/css" src="${ctx}/js/plugins/layui/css/layui.css"></style>
<script type="text/javascript" src="${ctx}/js/gpoint/rdp/card/department/department.js?V2019043002"></script>
<title>...</title>
</head>

<body>
	<!-- 顶部按钮 -->
	<div class="wrapper wrapper-content  animated fadeInRight col-sm-12">
		<div class="panel-toolbar ">
			<div class="buttons">
				<a href="javascript:void(0);" class="btn btn-primary fa fa-save">
					<span>保存</span>
				</a>
			</div>
		</div>
		<div class="panel-form">
			<form class="fr-form" id="departmentForm" action="save.htm">
				<input name="m:department:id" value="${department.id}" type="hidden" />
				<input name="m:department:servicecode" value="${department.servicecode}" type="hidden" />
				<!-- 
				<input name="m:department:parentcode" value="${department.parentcode}" type="hidden" />
				 -->
				<input name="m:department:createtime" value="<fmt:formatDate value='${department.createtime}' pattern='yyyy-MM-dd HH:mm:ss'/>" type="hidden" />
				<div class="fr_response_field col-sm-12">
					<div class="fr-form-group">
						<label class="fr-control-label">父节点</label>
						<div class="fr-form-block" data-type="fixed">
							<input name="m:campusCard:parentcode" type="hidden" id="hid_orgcode" class="fr-form-control" value="${department.parentcode}" validate="{required:false}" />							
						    <input type="text" data-key="#hid_orgcode" readonly="readonly" class="form-control comboTree" data-toggle="dictionary" data-url="${ctx}/rdp/card/department/department/list_json_tree.htm?typecode=parent" value="${department.parentFullName}" />
						</div>
					</div>
				</div>
				<div class="fr_response_field col-sm-6">
					<div class="fr-form-group">
						<label class="fr-control-label">组织名称</label>
						<div class="fr-form-block">
							<input name="m:department:orgname" value="${department.orgname}" validate="{required:true}" type="text" maxlength="16" class="fr-form-control" />
						</div>
					</div>
				</div>
				<div class="fr_response_field col-sm-6">
					<div class="fr-form-group">
						<label class="fr-control-label">组织编码</label>
						<div class="fr-form-block">
							<input name="m:department:orgcode" value="${department.orgcode}" validate="{required:false}" type="text" maxlength="16" class="fr-form-control" />
						</div>
					</div>
				</div>
				<div class="fr_response_field col-sm-6">
					<div class="fr-form-group">
						<label class="fr-control-label">组织类型</label>
						<div class="fr-form-block">
							<select name="m:department:typecode" value="${department.typecode}" validate="{required:true}" class="form-control">
								<option value="">请选择</option>
								<c:forEach var="item" items="${typeEnums}">
									<option value="${item.getValue()}" ${not empty department && department.typecode eq item.getValue()?'selected':''}>
									     ${item.getDesc()}
									</option>
								</c:forEach>
							</select>
						</div>
					</div>
				</div>
				<div class="fr_response_field col-sm-6">
					<div class="fr-form-group">
						<label class="fr-control-label">启用</label>
						<div class="fr-form-block">
							<select name="m:department:flag" value="${department.flag}" validate="{required:true}" class="form-control">
								<option value="">请选择</option>
                                <option value="1" ${not empty department && department.flag eq '1' ? 'selected':''}>是</option>
                                <option value="0" ${not empty department && department.flag eq '0' ? 'selected':''}>否</option>
							</select>
						</div>
					</div>
				</div>
				<div class="fr_response_field col-sm-12">
					<div class="fr-form-group">
						<label class="fr-control-label">备注</label>
						<div class="fr-form-block" data-type="fixed">
							<textarea name="m:department:remark" validate="{required:false}" maxlength="64" rows="2" class="fr-form-control fr-control-textarea">${department.remark}</textarea>
						</div>
					</div>
				</div>
			</form>
			<div style="clear: both"></div>
		</div>
	</div>
</body>

</html>